<?php header("Cache-Control: no-cache, must-revalidate");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title><?php __('Profile Administration Tools'); ?>
		<?php echo $title_for_layout; ?></title>
    <?php
        echo $this->Html->charset();
        echo $this->Html->meta('icon');
        echo $this->Html->css('main');
        echo $this->Html->css('form');
        echo $this->Html->css('jqueryUi');
        echo $this->Html->css('popBox');
        echo $this->Html->script('jquery.js');
        echo $this->Html->script('jqueryUi.js');
        echo $this->Html->script('custom.js');
        //echo $this->Html->script('mybox.js');
        echo $this->Html->script('popBox.js');

     ?>
      <!--[if IE]>
      <?php
              echo $this->Html->css('mainIE');
        echo $this->Html->script('customIE.js');
      ?>
        <![endif]-->
  </head>
  <body>
<!--**************************************************-->
<!--*****************  HEADER BEGIN  *****************-->
<!--**************************************************-->
      <div id="header">
          <div class="content">
    <!--*****************   TOP           *****************-->
              <div id="headerTop">
        <!--*****************  LOGO       *****************-->
                  <div class="headerLogo"></div>
        <!--*****************  TITLE      *****************-->
                  <div class="headerTitle"></div>
        <!--*****************  USER INFO  *****************-->
                  <div class="headerUserInfo">
                      <div class="headerUserInfoContent">
                          <div class="headerUserInfoActions">                              
                              <div class="language"><?php echo $this->Html->link('eng',array('action'=>'changeLang','eng'),array('class'=>'eng','title'=> __('English',true)));  ?></div>
                              <div class="language"><?php echo $this->Html->link('fre',array('action'=>'changeLang','fre'),array('class'=>'fre','title'=> __('French',true)));  ?></div>
                              <div class="language"><?php echo $this->Html->link('gmh',array('action'=>'changeLang','gmh'),array('class'=>'gmh','title'=> __('German',true)));  ?></div>
                              <div class="language"><?php echo $this->Html->link('ita',array('action'=>'changeLang','ita'),array('class'=>'ita','title'=> __('Italian',true)));  ?></div>
                              
                              <?php  if ($this->Session->read('Auth.User')): ?>
                              <div class="headerUserInfoActionsLogOut">
                                  <?php echo $this->Html->link( __('Log Out',true) ,array("controller"=>"users",'action'=>'logout'),array('title'=> __('Log Out',true))) ?>
                              </div>
                              <?php else:  ?>
                              <div class="headerUserInfoActionsLogIn">
                                  <?php echo $this->Html->link( __('Log In',true) ,array("controller"=>"users",'action'=>'login'),array('title'=> __('Log In',true))) ?>
                              </div>
                              
                              <?php endif;  ?>
                          </div>
                          <div class="headerUserInfoInfos">
                              
                              <div class="headerUserInfoInfosName">
                                  <?php 
                                  $n=$this->Session->read('Auth.User.UsName');
                                    if(isset($n) && !empty($n)):
                                        echo $this->Html->link( $this->Session->read('Auth.User.UsName'),array("controller"=>"users",'action'=>'account'),array('title'=> __('My Account',true)));
                                   ?>
                                        <div class="languageR <?php echo $this->Session->read('User.language');  ?>"></div>
                                   <?php  endif; ?>
                              </div>                              
                              <div class="headerUserInfoInfosGroup"><?php __($this->Session->read('Auth.User.group_name')); ?></div>
                              <?php  echo $session->flash('auth'); ?>
                              <?php  echo $session->flash(); ?>
                          
                          </div>
                          
                          
                              
                          
                      </div>
                  </div>
              </div>
    <!--*****************  BOTTOM BEGIN  *****************-->
              <div id="headerBottom">
    <!--*****************  MENU  *****************-->
                  <div class="headerMenu">
                      <?php
                        $menuClass=array(1=>'',2=>'',3=>'',4=>'');
                        if(isset($active)):
                        switch($active){
                            case 1: $menuClass=array(1=>'active',2=>'',3=>'',4=>'');break;
                            case 2: $menuClass=array(1=>'',2=>'active',3=>'',4=>'');break;
                            case 3: $menuClass=array(1=>'',2=>'',3=>'active',4=>'');break;
                            case 4: $menuClass=array(1=>'',2=>'',3=>'',4=>'active');break;
                            default: $menuClass=array(1=>'',2=>'',3=>'',4=>'');break;
                        }
                        endif;
                      ?>
                      <ul>
                          <li><?php echo $this->Html->link( __('My Demands',true) ,array("controller"=>"formstatuses",'action'=>'showForms'),array('class'=>$menuClass[1])) ?></li>
                          <li><?php echo $this->Html->link( __('New Demand',true) ,array("controller"=>"dmdforms",'action'=>'newDmdform'),array('class'=>$menuClass[2])) ?></li>
                          <li class="hoverTest"><?php echo $this->Html->link( __('Admin',true) ,array("controller"=>"modules",'action'=>'listModules'),array('class'=>$menuClass[3])) ?>
                              <ul>
                                  <li><?php echo $this->Html->link( __('Users',true) ,array("controller"=>"users",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('User status',true) ,array("controller"=>"statuses",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Groups',true) ,array("controller"=>"groups",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Companies',true) ,array("controller"=>"companies",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Countries',true) ,array("controller"=>"countries",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Job Functions',true) ,array("controller"=>"jobfunctions",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Job Profiles',true) ,array("controller"=>"jobprofiles",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Security groups',true) ,array("controller"=>"securitygroups",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Workflows',true) ,array("controller"=>"workflows",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Power Delegation',true) ,array("controller"=>"powerdelegations",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Tools',true) ,array("controller"=>"tools",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Modules',true) ,array("controller"=>"modules",'action'=>'listModules')) ?></li>
                                  <li><?php echo $this->Html->link( __('Demands',true) ,array("controller"=>"dmdforms",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Form status',true) ,array("controller"=>"formstatuses",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Demand status',true) ,array("controller"=>"dmdformstatuses",'action'=>'index')) ?></li>
                                  <li><?php echo $this->Html->link( __('Demand type',true) ,array("controller"=>"dmdformtypes",'action'=>'index')) ?></li>                                    
                                
                              </ul>
                          </li>
                          <li><?php echo $this->Html->link( __('Kpi',true) ,array("controller"=>"kpis",'action'=>'showKpis'),array('class'=>$menuClass[4])) ?></li>
                      </ul>
                      
                  </div>
              </div>
          </div>
      </div>
<!--**************************************************-->
<!--*****************  HEADER END    *****************-->
<!--**************************************************-->

<!--**************************************************-->
<!--*****************  CONTENT BEGIN *****************-->
<!--**************************************************-->
      <div id="content">
          <div class="content">
              
                <?php echo $content_for_layout; ?>
          </div>
      </div>
<!--**************************************************-->
<!--*****************  CONTENT END   *****************-->
<!--**************************************************-->

<!--**************************************************-->
<!--*****************  FOOTER BEGIN  *****************-->
<!--**************************************************-->
      <div id="footer">
          <div class="footerLeft">_</div>
          <div class="footerCenter">
              Copyright &#64;<?php echo date('Y') ?> Air Liquide Welding <br/>
              13 rue des Epluches, 92200 Saint Ouen L'aumone
          </div>
          <div class="footerRight"></div>
      </div>
<!--**************************************************-->
<!--*****************  FOOTER END    *****************-->
<!--**************************************************-->
<?php  //echo $this->element('sql_dump'); ?>
  </body>
</html>